/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.camara.jersey.Ws;

import com.camara.jersey.Models.User;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/user")
public class Users {
    
   // This method is called if XMLis request
  @GET
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) 
   public User getUsersToJson () {
       User user = new User (1978,"atcamara","passer");
       return user;
       
   }
   
   @GET
  @Produces({ MediaType.TEXT_XML }) 
   public User getUsersToHtml () {
       User user = new User (1978,"atcamara","passer");
       return user;
       
   }
   
   
    

}
